package com.aichan.aibi.service;

import com.aichan.aibi.common.DeleteRequest;
import com.aichan.aibi.model.dto.chart.ChartAddRequest;
import com.aichan.aibi.model.dto.chart.ChartQueryRequest;
import com.aichan.aibi.model.dto.chart.ChartUpdateRequest;
import com.aichan.aibi.model.dto.ai.GenChartRequest;
import com.aichan.aibi.model.entity.Chart;
import com.aichan.aibi.model.vo.ChartGenResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.concurrent.CompletableFuture;

/**
 * @author BakaAiChan
 * @description 针对表【chart(图表信息表)】的数据库操作Service
 * @createDate 2024-11-16 17:37:23
 */
public interface ChartService extends IService<Chart> {
    void addChart(ChartAddRequest chartAddRequest);

    void updateChart(ChartUpdateRequest chartUpdateRequest);

    void deleteChart(DeleteRequest deleteRequest);

    Page<Chart> getChartPage(ChartQueryRequest chartQueryRequest);

    ChartGenResult genResultFormUserDataByAI(MultipartFile multipartFile,
                                             GenChartRequest genChartRequest);

    CompletableFuture<Long> saveToDBBySync(ChartAddRequest chartAddRequest, Long userId);

    void updateToDBBySync(ChartUpdateRequest chartUpdateRequest);
}
